<?php

class LanguageModule extends fvModule {

    function __construct () {
        $moduleName = strtolower(substr(__CLASS__, 0, -6));

        parent::__construct(fvSite::$fvConfig->get("modules.{$moduleName}.smarty.template"), 
                            fvSite::$fvConfig->get("modules.{$moduleName}.smarty.compile"), 
                            fvSite::$Layoult);
    }

    function showMain() {
        $current_language = fvSite::$fvSession->get("lang");
        $languages = array(
        	"rus" => "русский",
        	"ukr" => "украинский",
        	"eng" => "английский",
        	"fra" => "французский",
        	"ita" => "итальянский",
        );
        $this->__assign('current_language', $languages[$current_language]);
        unset($languages[$current_language]); 
        $this->__assign('languages', $languages);
        return $this->__display('language_main.tpl');
    }
    
}

?>
